#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@file_name: comparing_coroutines_to_normal_functions.py
@date: 2025-07-23 15:19
@author: Falling Snow
@desc: coroutine 和正常函数的对比
"""


async def coroutine_add_one(number: int) -> int:
    return number + 1


def add_one(number: int) -> int:
    return number + 1


if __name__ == '__main__':
    function_result = add_one(1)
    coroutine_result = coroutine_add_one(1)

    print(f"普通函数结果为: {function_result} 返回值的类型为: {type(function_result)}")
    print(f"coroutine结果为: {coroutine_result} 返回值的类型为: {type(coroutine_result)}")
